package domain

type RoutingStrategy int32

const (
	RoutingStrategy_AUTO     RoutingStrategy = 0 // 智能路由
	RoutingStrategy_PROVIDER RoutingStrategy = 1 // 指定服务商
	RoutingStrategy_MODEL    RoutingStrategy = 2 // 指定模型
)

type ModelSpec struct {
	RoutingType string
	Provider    string
	ModelID     string
	Strategy    RoutingStrategy

	// 模型参数配置
	Params ModelParams
}

type ModelParams struct {
	Temperature float32
	TopP        float32
	MaxTokens   int32
	Stream      bool
	ExtraParams map[string]string
}

// 同步响应（对应 SyncResponse）
type SyncResponse struct {
	ResponseId  string
	Content     string
	Usage       SyncResponseUsage
	CreatedTime int64
	TaskId      string
}

type CallbackConfig struct {
	NotifyUrl    string
	RetryPolicy  int32
	MessageQueue string
}

type AsyncRequest struct {
	Req            SyncRequest
	CallbackConfig CallbackConfig
}

type AsyncResponse struct {
	TaskID                  string
	Status                  AsyncResponseStatus
	EstimatedCompletionTime int64
}

type AsyncResponseStatus int32

const (
	PendingStatus    AsyncResponseStatus = 0
	ProcessingStatus AsyncResponseStatus = 1
	CompletedStatus  AsyncResponseStatus = 2
	FailedStatus     AsyncResponseStatus = 3
	CancelStatus     AsyncResponseStatus = 4
)
